package com.nervenets.web.controller.order;

import com.nervenets.web.controller.TokenParams;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;

@EqualsAndHashCode(callSuper = true)
@Data
public class ShopCartUpdateParams extends TokenParams {
    @ApiModelProperty(value = "是否选中", required = true)
    private boolean selected;
    @ApiModelProperty(value = "分类Id", required = true)
    @Positive(message = "分类Id必须是正整数")
    private long typeId;
    @ApiModelProperty(value = "分类名称", required = true)
    @NotNull(message = "分类名称不能为空")
    private String typeName;
    @ApiModelProperty(value = "产品ID", required = true)
    @Positive(message = "产品ID必须是正整数")
    private long productId;
    @ApiModelProperty(value = "服务Logo", required = true)
    @NotNull(message = "服务Logo不能为空")
    private String logo;
    @ApiModelProperty(value = "服务名称", required = true)
    @NotNull(message = "服务名称不能为空")
    private String name;
    @ApiModelProperty(value = "服务价格", required = true)
    @Positive(message = "服务价格必须是正整数")
    private int price;
    @ApiModelProperty(value = "数量", required = true)
    @PositiveOrZero(message = "数量必须是大于等于零的正整数")
    private int total;
}
